package com.aaa.order.feign;

import com.aaa.order.factory.ProductFeignFactory;
import entity.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//value:远程调用微服务的名称
@FeignClient(value = "shop-product",fallbackFactory = ProductFeignFactory.class)
public interface ProductFeign {
    @GetMapping("/product/getById/{pid}")
    public Product getById(@PathVariable Long pid);
}
